﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<#include "/pages/include/front_include.ftl" />
<@h.css href="/css/upload.css"/>
<@h.css href="/css/ugcViewCom.css"/>
<@h.css href="/css/style.css"/>
<@h.css href="/css/indexStyle.css"/>
<@h.css href="/css/letaoUI.css"/>
<@h.css href="/css/indexUI.css"/>
<@h.css href="/css/buttons.css"/>
<@h.js src="/javascripts/front/base.Letao.js"/>
<@h.js src="/javascripts/front/indexUI.js"/>
<@h.js src="/javascripts/public/myfile.js"/>
<@h.js src="/javascripts/public/news.js"/>
<@h.js src="/javascripts/public/faq.js"/>
<script type="text/javascript">
	var myfile=new myfile();
	var news=new news();
	var faq=new faq();
	$(function(){
		loadFaq();
	});
	
	function loadFaq(){
		faq.loadFileFaq(${file.id},${currentPage});
	}
	
	function loadFaq1(id,no){
		faq.loadFileFaq(id,no);
	}
	
	function feedback(faqId,content){
		news.feedback(faqId,content);
	}
</script>
<style type="text/css">
#docInfo p{
 	line-height:23px;
}
.aside h2{
	line-height:30px;font-weight:bold;
}
.wk-impeachDoc-moreq{
	font-weight:bold;
}
h3{
font-weight:bold;
}
a.sliverbutton b{
	line-height:23px;
}
a.minibutton:link, a.minibutton:visited {
color: white;
text-decoration: none;
}
</style>
</head>

<body>
<#include "/pages/include/header.ftl" />

<div class="center">
	<div id="nav" class="nav">
		&nbsp;
	</div>
	<div class="main skin-category-list box_con" style="width: 767px;">
		<div id="header">
			<div id="wk-jb-clew" class="wk-jb-clew" style="display: none;">
			</div>
			<div>
				<h1 class="wk-impeachDoc-moreq">
				${file.fileName?if_exists}</h1>
			</div>
			<div style="clear: both">
			</div>
			<div id="step2" class="multi-upload" style="border: none; margin-right: 10px;">
				<div id="all-fill">
					<div align="center">
						<#if file.publishTime?exists>${file.publishTime?string('yyyy年MM月dd日HH:mm')}<#elseif file.uploadTime?exists> ${file.uploadTime?string('yyyy年MM月dd日HH:mm')}</#if>
						&nbsp;&nbsp;&nbsp;&nbsp; 
						<#if  file.status=="APPROVE">
							<a href="#f" title="点击评论">我要评论(<span id="faqSum">${file.faqSum?if_exists}</span>) </a>
						<#else>
							<span style="color:gray" title="该文件不支持评论">我要评论</span> 
						</#if>
						&nbsp;&nbsp;&nbsp; 
						<#if  file.status=="APPROVE">
							<#if file.isAddFavorite(userId)>
								<span style="color:gray" title="该文件已经收藏">已收藏</span> 
							<#else>
								<a id="addFavorite" href="javascript:myfile.addFav(${file.id?if_exists});" title="点击收藏">收藏 </a>
							</#if>
						</#if>

					</div>
					
					<h3>关键字：${file.keyword?if_exists}</h3>
					<div class="form-holder clearfix">
						<dl class="form-sumary">
							<dd>
							<p style="font-size: medium; line-height: 23px;" class="style6">
							${file.desc?if_exists}</p>
							</dd>
						</dl>
						<dl style="line-height:33px;">
							<dd style="text-align: left">
							<#if !file.attachPosition?exists || file.attachPosition==1>
							<#if file.attachments?exists>
								<div>
									<h3>附件：</h3>
								</div>
								<#list file.attachments as a>
									<#if a.photoName?exists>
									<div style="float:left;width:200px;margin:0px 10px 10px;">
										<img style="width:200px" src="${a.photoPath}"/>
										<div>
										
										</div>
									</div>
									</#if>
									<div style="height:33px;margin:10px 0px;">
										<span title="${a.attachType.name?if_exists}" 
											<#if a.attachType.name=='pdf'>
												class="pdf icon"
											<#elseif a.attachType.name=='doc'>
												class="doc icon"
											<#elseif a.attachType.name=='docx'>
												class="docx icon"
											<#elseif a.attachType.name=='ppt'>
												class="ppt icon"
											<#elseif a.attachType.name=='pptx'>
												class="pptx icon"
											<#elseif a.attachType.name=='xls'>
												class="xls icon"
											<#elseif a.attachType.name=='xlsx'>
												class="xlsx icon"
											<#elseif a.attachType.name=='wps'>
												class="wps icon"
											<#elseif a.attachType.name=='txt'>
												class="rtf icon"
											<#else>
												class="txt icon"
											</#if>
											></span>
											&nbsp;<span title="${a.attachName?if_exists}">
											<#if a.attachName?exists>
												<#if a.attachName?length gte 40>
													${a.attachName?substring(0,40)}...
												<#else>
													${a.attachName}
												</#if>
											</#if>
											<#if a.attachSize?exists>
											<#if a.attachSize gt 1024>
												(${(a.attachSize/1024)?string("0.##")}M)
											<#else>
												(${a.attachSize}K)
											</#if>
											</#if>
											</span>&nbsp;&nbsp;&nbsp; 
											[
												<#if a.canPreview>
													<#if  file.status=="APPROVE">
														<a target="_blank" href="${contextPath}/myfile/myfile-preview.action?attachId=${a.id?if_exists}" title="点击预览" style="color:#0169ba" >预览</a>
													<#else>
														<span style="color:gray" title="该文件尚未发布">预览</span>
													</#if>
												<#else>
													<span style="color:gray" title="该文件不支持预览">预览</span>
												</#if>
												 |
												<#if file.canDown>
													<#if  file.status=="APPROVE">
														<a href="${contextPath}/download.action?id=${a.id?if_exists}&from=1" title="点击下载" style="color:#0169ba">	下载</a>
													<#else>
														<span style="color:gray" title="该文件尚未发布">下载</span>
													</#if>
												<#else>
													<span style="color:gray" title="该文件无法下载">下载</span>
												</#if>
											]
									</div>
									<div class="clear"></div>
								</#list>
							</#if>
							</#if>
							</dd>
						</dl>
					</div>
				</div>
			</div>
		</div>
		
	</div>
	<div class="raside">
		<div class="mt10 box">
			<div class="content">
				<h2>当前文件信息</h2>
				<div id="docInfo">
					<p class="view">浏览：${file.browserSum?if_exists}次<span class="ml">下载：${file.downSum?if_exists}次</span></p>
					<p>贡献时间：<#if file.publishTime?exists>${file.publishTime?string('yyyy-MM-dd HH:mm')}<#elseif file.uploadTime?exists> ${file.uploadTime?string('yyyy-MM-dd HH:mm')}</#if></p>
					<p>贡献者： ${file.publishUserName?if_exists}</p>
					<p>分类： ${file.category?if_exists}</p>
					<p>关键词： ${file.keyword?if_exists}</p>
					<p class="c" id="FriendsCor"></p>
					<p class="c"></p>
				</div>
			</div>
		</div>
		<div style="height:10px;"></div>
		<#if file.attachPosition?exists && file.attachPosition==2>
		<div class="box">
			<div class="content">
				<div class="hd">
						<b class="f-black">
						附件</b>					
				</div>
				<div class="cd c-align">
				<#if file.attachments?exists>
								<#list file.attachments as a>
									<#if a.photoName?exists>
									<div style="width:190px;margin:10px 0px">
										<img style="width:190px" src="${a.photoPath}"/>
										<div>
										
										</div>
									</div>
									</#if>
									<div style="height:33px;" align="center">
										<span title="${a.attachType.name?if_exists}" 
											<#if a.attachType.name=='pdf'>
												class="pdf icon"
											<#elseif a.attachType.name=='doc'>
												class="doc icon"
											<#elseif a.attachType.name=='docx'>
												class="docx icon"
											<#elseif a.attachType.name=='ppt'>
												class="ppt icon"
											<#elseif a.attachType.name=='pptx'>
												class="pptx icon"
											<#elseif a.attachType.name=='xls'>
												class="xls icon"
											<#elseif a.attachType.name=='xlsx'>
												class="xlsx icon"
											<#elseif a.attachType.name=='wps'>
												class="wps icon"
											<#else>
												class="txt icon"
											</#if>
											></span>
											&nbsp;<span title="${a.attachName?if_exists}">
											<#if a.attachName?exists>
												<#if a.attachName?length gte 40>
													${a.attachName?substring(0,40)}...
												<#else>
													${a.attachName}
												</#if>
											</#if>
											<#if a.attachSize?exists>
											<#if a.attachSize gt 1024>
												(${(a.attachSize/1024)?string("0.##")}M)
											<#else>
												(${a.attachSize}K)
											</#if>
											</#if>
											</span><br> 
											[
												<#if a.canPreview>
													<#if  file.status=="APPROVE">
														<a target="_blank" href="${contextPath}/myfile/myfile-preview.action?attachId=${a.id?if_exists}" title="点击预览" style="color:#0169ba">预览</a>
													<#else>
														<span style="color:gray" title="该文件尚未发布">预览</span>
													</#if>
												<#else>
													<span style="color:gray" title="该文件不支持预览">预览</span>
												</#if>
												 |
												<#if file.canDown>
													<#if  file.status=="APPROVE">
														<a href="${contextPath}/download.action?id=${a.id?if_exists}&from=1" title="点击下载" style="color:#0169ba">	下载</a>
													<#else>
														<span style="color:gray" title="该文件尚未发布">下载</span>
													</#if>
												<#else>
													<span style="color:gray" title="该文件无法下载">下载</span>
												</#if>
											]
									</div>
									<div class="clear"></div>
								</#list>
							</#if>
					</div>
			</div>
		</div>
		</#if>
	</div>
	<#if  file.status=="APPROVE" && file.canFaq>
		<div class="main skin-category-list faqbox list_container" style="background: #F3F8FC;margin-top:20px;">
			<div id="faqContainer" class="mt">
			</div>
		</div>
		<div class="main skin-category-list faq" style="margin-top:20px;">
			<div style="padding:20px 20px;">
				<a name="f"></a>
				<div class="style">
					<h2>发表评论</h2><div style="float: right; font-size: 12px; font-weight: normal;">
						你最多可以输入255个字</div>
				</div>
				<div>
					<div>
						<textarea id="faqContent" name="TextArea1" class="l-textarea" maxlength="255" rows="10" style="width:100%"></textarea>
					</div>
					<div style="float: right;margin:10px 0px;">
						<a id="FaqBtn" href="javascript:news.submitFaq(${file.id?if_exists},null,1,${file.categoryId?if_exists});" class="sliverbutton"><span>发表评论</span></a>
					</div>
				</div>
			</div>
		</div>
		</#if>
	<div class="clear">
	</div>
</div>
<#include "/pages/include/footer.ftl" />
</body>

</html>
